package com.hschinese.pronunciation.activity;

import android.os.Bundle;
import android.widget.ListView;

import com.hschinese.pronunciation.R;
import com.hschinese.pronunciation.adapter.ConsonantListViewAdapter;

import java.util.ArrayList;
import java.util.List;

public class ConsonantListActivity extends BaseActivity {
    private ListView mListView;
    private List<String> mListData;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_consonant_list);
        mListView = (ListView)findViewById(R.id.consonants_listview);
        getData();
        ConsonantListViewAdapter mListAdapter = new ConsonantListViewAdapter(ConsonantListActivity.this, mListData);
        mListView.setAdapter(mListAdapter);
        mListAdapter.notifyDataSetChanged();
    }

    private void getData() {
        mListData = new ArrayList<String>();
        for (int i=0; i<10; i++) {
            mListData.add("i = " + i);
        }
    }
}
